<%-- 
    Document   : index
    Created on : 21-11-2013, 09:40:36 AM
    Author     : CITT-2013
--%>

<%@page import="libreriaTicket.dao.DaoEvento"%>
<%@page import="libreriaTicket.entity.Evento"%>
<%@page import="java.util.ArrayList"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%
    String valor =(String)session.getAttribute("nombre");
%>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html>
    <head>
        <title>Bienvenido a TicketMarket</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        
        <link href="publico/css/bootstrap-theme.min.css" rel="stylesheet" media="screen">
        <link href="publico/css/bootstrap.css" rel="stylesheet" media="screen">
        <script src="publico/javascript/jquery.js" type="text/javascript"></script>
    </head>
    <body>
        <header style="min-height: 100px; position: relative;">
        <%
                if(valor!=null){
                    %><jsp:include page="ingresado.jsp" flush="true"/><%
                }else{
                    %><jsp:include page="menu.html" flush="true"/><%
                }
            %>
    </header>
    <div class="container">
    <!-- Main jumbotron for a primary marketing message or call to action -->
    <div class="jumbotron" style="margin-top:10px">
      <div class="container">
          <jsp:include page="slider.html" flush="true"/>
      </div>
    </div>

    <div class="container">
      <!-- Example row of columns -->
      <div class="row">
        
            <%
                ArrayList<Evento> eventos = DaoEvento.sqlSelectAll();
                for(Evento a: eventos){
                    out.write("<div class=\"col-md-4\">");
                    out.write("<p>"+a.getImagen()+"</p>");
                    
                    out.write("<h2>"+a.getNombre()+"</h2>");
                    out.write("<p>"+a.getFechaEvento()+"</p>");
                    out.write("<p><a class=\"btn btn-default\" href=\"FrVenta.jsp?idEvento="+String.valueOf(a.getIdEvento())+"\" role=\"button\">Ver &raquo;</a></p>");
                    out.write("</div>");
                        
                }
            
            %>
            
      </div>

      <hr>
      
      </div>

      <footer>
        <p>&copy; Company 2013</p>
      </footer>
    </div> <!-- /container -->


    <!-- Bootstrap core JavaScript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
    <script src="https://code.jquery.com/jquery-1.10.2.min.js"></script>
    <script src="../../dist/js/bootstrap.min.js"></script>
    </body>
</html>

